<script setup lang="ts">
const route = useRoute();
const isRouterAlive = ref(true)
const reload = () => {
  isRouterAlive.value = false
  nextTick(() => {
    isRouterAlive.value = true
  })
}
provide("reload", reload)
</script>

<template>
  <el-container class="flex" style="height: 100%;">
    <el-header>
      <Header />
    </el-header>
    <el-main class="main_view">
      <RouterView v-if="isRouterAlive" :key="route.fullPath" />
    </el-main>
  </el-container>
</template>

<style scoped>
.main_view::-webkit-scrollbar {
  display: none;
}

.main_view {
  padding: 0;
  /* overflow: hidden; */
}

.el-header {
  height: 40px;
}
</style>
